﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic" xmlns:Microsoft_Windows_Themes1="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Luna">
	<!-- Resource dictionary entries should be defined here. -->
	<ResourceDictionary.MergedDictionaries>
  		<ResourceDictionary Source="Brushes.xaml" />
    </ResourceDictionary.MergedDictionaries>
	<Style x:Key="ListViewColumnHeaderStyle" TargetType="{x:Type GridViewColumnHeader}">
			<Setter Property="Template" Value="{DynamicResource ListViewColumnHeaderControlTemplate}"/>
	</Style>
	<DataTemplate x:Key="ListViewColumnHeaderTemplate">
	    <Grid>
			<TextBlock FontSize="12" FontWeight="Bold" Foreground="{DynamicResource DarkBlueFontBrush}" Text="{Binding}" TextWrapping="NoWrap"/>
		</Grid>
	</DataTemplate>
		<DataTemplate x:Key="HeaderTemplateArrowUp">
        	<DockPanel>
        		<TextBlock HorizontalAlignment="Center" Foreground="{DynamicResource DarkBlueFontBrush}" Text="{Binding}"  FontWeight="Bold" FontSize="12" />
        		<Path x:Name="arrow"
           			StrokeThickness = "1"					  
           			Fill            = "darkblue"
           			Data            = "M 5,10 L 15,10 L 10,5 L 5,10"/>
     		</DockPanel>
    	</DataTemplate>
    	
		<DataTemplate x:Key="HeaderTemplateArrowDown">
      		<DockPanel>
        		<TextBlock  FontSize="12" HorizontalAlignment="Center" Foreground="{DynamicResource DarkBlueFontBrush}" Text="{Binding }" FontWeight="Bold"/>
        		<Path x:Name="arrow"
              		StrokeThickness = "1"					  
              		Fill            = "darkblue"
              		Data            = "M 5,5 L 10,10 L 15,5 L 5,5"/>
      		</DockPanel>
    	</DataTemplate>
	<ControlTemplate x:Key="ListViewColumnHeaderControlTemplate" TargetType="{x:Type GridViewColumnHeader}">
		<Border SnapsToDevicePixels="True" Height="27" BorderBrush="#FF9FB6C7" BorderThickness="1,1,1,1">
			<Border.Background>
				<LinearGradientBrush EndPoint="0.534,0.98" StartPoint="0.534,0.04">
					<GradientStop Color="#FFFFFFFF" Offset="0"/>
					<GradientStop Color="#FFC2CBDA" Offset="1"/>
					<GradientStop Color="#FFC2CEDF" Offset="0.567"/>
				</LinearGradientBrush>
			</Border.Background>
			<Grid>
				<Microsoft_Windows_Themes:ClassicBorderDecorator x:Name="ContentContainer" BorderStyle="Raised" Width="Auto" Height="Auto" >
					<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" RecognizesAccessKey="True"/>
				</Microsoft_Windows_Themes:ClassicBorderDecorator>
				<Canvas Width="Auto" Height="Auto">
					<Thumb x:Name="PART_HeaderGripper" Background="#00FFFFFF">
						<Thumb.Style>
							<Style TargetType="{x:Type Thumb}">
								<Setter Property="Canvas.Right" Value="-9"/>
								<Setter Property="Width" Value="18"/>
								<Setter Property="Height" Value="{Binding Path=ActualHeight, RelativeSource={RelativeSource TemplatedParent}}"/>
								<Setter Property="Padding" Value="0,3,0,4"/>
								<Setter Property="Background" Value="#FF000000"/>
								<Setter Property="Template">
									<Setter.Value>
										<ControlTemplate TargetType="{x:Type Thumb}">
											<Border Background="#00FFFFFF" Padding="{TemplateBinding Padding}">
												<Rectangle Fill="{TemplateBinding Background}" HorizontalAlignment="Center" Width="1"/>
											</Border>
										</ControlTemplate>
									</Setter.Value>
								</Setter>
							</Style>
						</Thumb.Style>
					</Thumb>
				</Canvas>
			</Grid>
		</Border>
		<ControlTemplate.Triggers>
			<Trigger Property="IsPressed" Value="True">
				<Setter Property="BorderStyle" TargetName="ContentContainer" Value="RaisedPressed"/>
				<Setter Property="BorderThickness" TargetName="ContentContainer" Value="0,0,0,0"/>
				<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
			</Trigger>
			<Trigger Property="Height" Value="Auto">
				<Setter Property="MinHeight" Value="20"/>
			</Trigger>
			<Trigger Property="IsEnabled" Value="False">
				<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
			</Trigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>
	<Style x:Key="ListViewItemStyle1" TargetType="{x:Type ListViewItem}">
			<Setter Property="Template" Value="{DynamicResource ListViewItemControlTemplate1}"/>
		</Style>
		<ControlTemplate x:Key="ListViewItemControlTemplate1" TargetType="{x:Type ListViewItem}">
			<Border SnapsToDevicePixels="True" x:Name="Bd" Height="25" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" Margin="0,0,0,0">
				<GridViewRowPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" Columns="{TemplateBinding GridView.ColumnCollection}"/>
			</Border>
			<ControlTemplate.Triggers>
				<Trigger Property="IsSelected" Value="True">
					<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
					<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.MenuHighlightBrushKey}}"/>
				</Trigger>
				<MultiTrigger>
					<MultiTrigger.Conditions>
						<Condition Property="IsSelected" Value="True"/>
						<Condition Property="Selector.IsSelectionActive" Value="False"/>
					</MultiTrigger.Conditions>
					<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
					<Setter Property="Background" TargetName="Bd" Value="#FFC2EBFC"/>
				</MultiTrigger>
				<Trigger Property="IsEnabled" Value="False">
					<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
				</Trigger>
			</ControlTemplate.Triggers>
		</ControlTemplate>
</ResourceDictionary>